classdef SimpleCrosser
    %UNTITLED4 Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
    end
    
    methods
        function children = execute(~, obj, parents)
            child1 = obj.IndividualsClass.new(obj); %have to add .new static function to Individual implementation
            child2 = obj.IndividualsClass.new(obj);
            
            [conn1, conn2] = cross_connections( parents(1).connections, parents(2).connections, obj.pattern );
            child1.connections = conn1;           
            child2.connections = conn2;
            children = [child1, child2];
        end
    end
    
end

